home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #11
/
Amiga Plus CD - 2004 - No. 11.iso
/
AmiSoft
/
Comm
/
mail
/
SpamFryer.lha
/
SpamFryer
/
SpamFryer.text
< prev
next >
Wrap
Text File
|
2004-08-22
|
41KB
|
921 lines
Summary
SpamFryer is a small utility which deletes unsolicited emails from
an ISP's server, without you having to download them. Over the six
months before release it has got rid of 85 to 95 per cent of the
spam directed to the author's email accounts, without deleting any
messages he actually wanted to read. That said, your mileage may
vary. SpamFryer is free and you're free to use it or not, at your
own risk.
An indexed and hyperlinked version of this document is in the
file SpamFryer.guide. Apart from the links and formatting, the
content of both files is the same. The AmigaGuide version is
for people who prefer to pick their way though an electronic
document. The plain text suits those who prefer to refer to
a printout, or be sure they've read everything.
-------------------------------------------------------------
Requirements
AmiTCP or compatible TCP/IP stack (e.g. Genesis, Miami or Roadshow).
An account with Internet Service Provider that offers POP3 email
(virtually all do).
ARexx (add-on or as bundled by Commodore with Kickstart 2 and 3).
A network-capable Amiga (A500 to A4000, or authentic emulation
e.g. Amithlon, or UAE running a genuine Amiga TCP/IP stack).
-------------------------------------------------------------
Improvements
Version 2:1 rejects more spams, works with more POP3 servers,
generates better reports, runs faster, supports multiple POP3
accounts, and has pretty new icons.
Version 3:7 adds the ability to specify rules via 'keep' and
'lose' lists set in the script or from configuration files.
It can also read account details from a separate file, and
accept passwords interactively if you prefer not to store
them in plain-text on your system. It now works with public
ARexx ports, comes with over 100 rules to sift out good and
bad mails, provides even better reports, and has updated and
improved documentation, as you can probably tell by now. :-)
Version 3:9 adds a French translation of the script, two new
rules, and further improvements to the documentation.
-------------------------------------------------------------
Essential Configuration
Before you try to use SpamFryer you need to configure it to access
your internet service provider and email account. If you are unable
to edit a text file, please give up at this stage :-(. Presuming you
know how to edit a text file, and can get hold of your own account
details (I can't help you with this!) there are two ways to do this
- by adding your details to the SpamFryer.accounts file, or embedding
them in the SpamFryer.rexx script. It's simpler to put them in the
SpamFryer.accounts file as long as you don't mind keeping several
SpamFryer files together in one directory.
Three bits of information are needed before SpamFryer can log in to
an email account and check for spam on your behalf. One of these,
the password, is optional - if you choose not put it in the text
files (e.g. for security reasons if you are running a server and
allow remote users access to all drives on your machine) SpamFryer
will pop up a requester, requiring you to type in the password
each time it needs access to the relevant account.
This information appears in the YAM2 mailer's Settings/Configuration/First
Steps dialogue, and in the yam:.config file (under POP00.Server, POP00.User
and POP00.Password - though the latter is deliberately obscured in the YAM
files, for security reasons). If all else fails, you can get the password,
or a replacement one, from your Internet Service Provider (ISP).
Typically you'll include three lines in SpamFryer.accounts for each
POP3 mail account you want SpamFryer to check, e.g.
Hostname: mail.isp.org
Username: ISP_Account_Name
Password: guessthis
or
Hostname: 194.5.6.7
Username: JoeBlogs
Password: tribbles
HostName identifies the mail server (the machine that stores emails for
you to collect) on the internet. This can be an IP number e.g. 194.5.6.7
or a domain name like mail.demon.net
UserName is the name your computer uses to identify itself, and you, to
the mail server. Typically this is your ISP account name.
You can give details of as many accounts as you like. SpamFryer
will check them all, in the order you specify them. The Username
and Hostname for each may come in either order. If you miss out the
password your Amiga will need to be running Workbench 2 or later,
and have reqtools.library and rexxreqtools.library on its LIBS:
path, in order that it can ask for the password interactively.
You can put comments in any of the SpamFryer configuration files
(SpamFryer.accounts, SpamFryer.keepList and SpamFryer.loseList)
by starting the line with two slashes and a space, like this:
// this is a comment
Blank lines are allowed, and ignored.
Alternatively, if you'd prefer to keep all your changes in one file
and be able to run SpamFryer without needing other files, add three
lines near the start of the file SpamFryer.rexx, after the comment
/*** CONFIGURATION BLOCK **/ and before the line starting keepList,
as follows:
Account.1.1 = "mail.isp.net"
This can be an IP number e.g. 194.5.6.7 or a domain name like mail.demon.net
Account.1.2 = "yourname"
This needs to be your user name - the name your computer uses to identify
itself, and you, to the mail server. Typically this is your ISP account name.
Account.1.3 = "password"
This should be the confidential login password you use for email. If you
run any sort of server on your Amiga, you should read this from somewhere
that people logging on to your machine can't access, or they might extract
your password from the SpamFryer script (or any other software you use for
email access). If you make a new version of SpamFryer, remember to remove
this before you send the modified code to anyone else!
SpamFryer can check mails from more than one server, and make a log
of what it finds and does on each one. To do this, add additional lines
for other accounts, called Account.2.1, Account.2.2 and Account.2.3 for
the same three items of information listed above for your second server,
and more (e.g. Account.3.1, etc) for as many other accounts as you like.
Alternatively you can put these details in the SpamFryer.accounts file,
or keep some in the file and some in the script - which may be handy if
you want to change part of the configuration (e.g. by renaming several
copies of the accounts file as required) while always checking servers
listed in the script.
You may like to adjust the reports SpamFryer generates, to help you
understand and tune what it's doing. If you'd like to try it first,
skip to the next section headed Usage. Otherwise, read on.
-------------------------------------------------------------
Optional Configuration
You don't need to provide any information other than the server and user
names and a password to use SpamFryer. However there are a few other lines,
in the configuration block which you may wish to add or alter to tune
SpamFryer for your system. Of course, you're free to change the whole
script, but the block at the start contains the main configurable ones.
Four lines specify files that SpamFryer will attempt to read or write.
You can edit these lines to change the name or location of the files.
The first three are optional data files, presumed to be in the same
directory as the SpamFryer.rexx script unless you alter the assignments
to include an alternative path (e.g. WORK:Secure/SpamFryer.accounts):
SpamFryer.keepList is the default path and name of the optional file
which identifies mails you want to keep.
SpamFryer.loseList is the default path and name of the optional file
holding details of mails you want to lose.
SpamFryer.accounts is the default name of the optional file containing
information used to log in to your POP3 accounts.
SpamFryer.log is the output file, normally directed to the T: drive,
which logs what SpamFryer script finds on the server and what it does
as a result. If the verbose variable is set to 1, in the script or by
passing an eponymous argument when the script is called, for instance
rx SpamFryer.rexx VERBOSE
The log will contain lots of extra information, including lists of
account details and rules, header information from each mail checked,
and a note on what SpamFryer has done about it. By default the log
file just reports the subject and number of each mail it fries, and
information about errors in the configuration files, with simple
headings. The same information is written to a console window as
the script runs, so you can see what it's doing as it goes along.
screenName gives the name of the public screen on which you want
to see a temporary copy of the log as SpamFryer runs - close this
when you've finished with it. The default is '*' which opens a window
on the current screen. lineMax sets the maximum number of characters
of subject lines reported to the screen. Some mails - usually spams -
have very long subjects, so this limits the maximum amount of screen
space such a line can take up.
Finally 'noDigits' sets or clears an experimental flag which marks
mails with any numeric digits in their To: address for zapping. Many
spammers make up email addresses for known servers, and if you have
your own domain this rule helps you sift out those non-existent user
names which would otherwise be delivered to your Amiga. BEWARE: This
flag may deleted wanted mails (e.g. if you are cc'd on a mail to an
Yahoo, Freeserve or AOL victim with a human-hostile user name) unless
you apply other rules, e.g. in the keeplist, to make sure mails that
are specifically addressed to you don't get flushed with the spams.
Miami integration
To make SpamFryer run automatically when Miami goes online,
use a MiamiOnline.yam script something like this:
miamipath = "WORK:COMMS/MIAMI/Miami" /* Change this if required */
Spampath = "work:comms/SpamFryer/SpamFryer.rexx" /* Add this line */
OPTIONS RESULTS
IF ~SHOW('P', 'MIAMI.1') THEN DO
ADDRESS COMMAND
'Run <>NIL:' miamipath
'WaitForPort MIAMI.1'
END
ADDRESS 'MIAMI.1'
ISONLINE
IF RC=0 THEN ONLINE
ISONLINE
IF RC=0 THEN EXIT 5
HIDE
ADDRESS COMMAND /* Added for SpamFryer by Kelvin Graham */
'rx' Spampath
'wait 10'
'endcli'
EXIT 0
Alternative icons
The subdirectory Alternate Icons contains replacements for the default
SpamFryer launch icon. These work the same way but vary in size and
colouring to best suit old and new Amiga systems. The text file in
the same drawer gives more details.
YAM Support
Marcel Beck's YAM (Yet Another Mailer), now open source, is the premier
Amiga email application. Two scripts contributed by users of SpamFryer
are in the subdirectory YAM Support, with plain-text documentation.
MiamiOnline.yam modifies the script that launches Miami so that it
also fires up SpamFryer, so your new email is filtered automatically,
as noted above.
SpamFryer.yam uses the rules and configuration of SpamFryer.rexx to
scan mails already downloaded and move the likely spams from one
YAM folder to another. It is most useful for those with continuous
and fast internet connections, who do not need to eliminate download
time but still wish to sift spams from their other mail automatically.
-------------------------------------------------------------
Usage
You can start SpamFryer by clicking on the supplied icon or with an
AmigaOS command (rx SpamFryer.rexx when SpamFryer.rexx is in the
current directory or on your path). The script has been successfully
tested on AmigaOS 3.0 with Genesis, earlier versions of AmiTCP, Miami
and Roadshow, the new AmigaOS 4 stack. It does not work with the tiny
TCP/IP implementation forwarded from the host by UAE because that
does not yet implement the AmigaOS TCP: device.
You can also configure it to be launched as an ARexx script by Miami,
or run it from the console. One optional parameter 'verbose' makes it
list the details of mails it leaves, as well as those it zaps, in the
console log.
You do need to be online and have the ARexx server running when you
start SpamFryer. The easiest way to ensure the latter is to put RexxMast
in your sys:wbstartup directory when you boot your Amiga. ARexx shipped
as a standard component of Commodore's AmigaOS versions 2 and 3.
SpamFryer checks through emails on a POP3 host and purges the
unwanted ones by applying simple rules that sift out nine-tenths
of the mass-produced junk mail and attempts by dimwitted PC trojan
and virus programs to mate with Amigas. While these viruses die out
when they reach a real computer (indeed, anything not running Windoze)
they are large, arrive many times over, and are of course useless.
SpamFryer shows a summary of waiting messages and deletes any with html
right the start, or subjects or a recipient address known to be bogus.
It includes special sifting for recent Windoze .PIF worms, and mails
flagged by SpamAssassin on the server. It's easy to extend for similar
cases (e.g. new viruses or trojans and mails from particular idiots
who unfortunately have your address) but I find it catches 80..90 per
cent of spams without adding any extra code - if I get a rash of new
spams that it misses I add an extra rule or two.
-------------------------------------------------------------
Customisation
Since SpamFryer is a short plain-text program you can be sure of
what it does and doesn't do, and can easily extend it to do more
- or less, e.g. just report likely spams without deleting them -
by adding rules to the configuration files, or by editing the
script. If you can do it by editing the configuration, that's
likely to be a lot easier and less risky than editing the script.
At first SpamFryer automated the procedure I used to manually
get rid of spams, by printing the commands automatically to
save me typing them, and reading the message headers to find
the sure signs of spam - these include HTML in the first few
lines (i.e. a message with no plain text part); subjects
known to be autogenerated by persistent spamming programs;
mails marked as spam (but not actually deleted) by a server
filter program like SpamAssassin, which was used by Amiga Inc;
mails to any address you've abandoned but which is still
redirected to you, and emails with .scr and .pif MIME
attachments which are useless on Amigas and generally only
a cause of infection to PCs. If anyone does really need to
send you one of those, ask them to rename it or compress
it into an archive with LHA, LZX, ZIP or whatever so that
SpamFryer doesn't zap the mail.
At first SpamFryer only looked for reasons to delete a
mail, and had to be conservative about such rules in case
it accidentally deleted something important. Then Allan
Rasmussen volunteered to add support for rules in separate
files, and for rules that denote a mail that should be kept
rather than lost (sometimes known as a whitelist). This
means that tests can use shorter and more general patterns,
as long as they are effective in identifying spams, as
the risk of losing a wanted mail is reduced
The snag of this is that the whole mail header and
first part of every mail must be read by the script,
in case a later line contains text that indicates the
mail should be kept, despite spam matches earlier.
This slows down the checks, as they can't skip a mail
as soon as it's matched a spam test.
SpamFryer lists
SpamFryer now contains more than 100 rules, in the two
configuration files and in the script itself. Only the
most safe yet effective rules are in the script, where
they are hardest to lose. This means that SpamFryer has
a basic but useful capability without any extra files
(as long as you add your account details to the script).
SpamFryer.keepList contains rules that tell SpamFryer about
mails you always want left on the server. These are mails
you never want deleted, even if they contain text that is
typically in junk mail. For instance, mails with SpamFryer
in the checked text are always left on the server (unless
you alter SpamFryer.keeplist to remove the rule) so that
people can quote messages that SpamFryer might delete (for
better or worse) without having their discussion fried!
The tests look for references to 'Spam Fryer' (with a
space) as well as SpamFryer (without) in case someone
prefers to type the name as two words. The rule starts
with the term 'Early-Ref:' so that the entire mail header
and first few lines (up to the point where an HTML-only
message can be identified) are checked for the pattern.
This 'Early-Ref:' category is the slowest test; others
look for certain lines in the mail header and only look
further on the line, trying all the patterns in that
category, providing the first part matches.
The first word in the list file tells SpamFryer what part
of the mail to test - the quicker options test the Subject:,
From:, or To: or Reply-To: lines in the header. The colons
and dashes are optional but recommended as they mean the
category names correspond to those used in a mail header.
The remainder of each line in the keepList file indicates a
pattern to look for. If that pattern appears anywhere in
the part of the mail specified by the first word, the mail
will be left on the server; it won't be fried even if it
matches rules in the loseList.
Rules in the loseList work the same way, except that they
detect patterns which may indicate junk mail, and can be
over-ridden by any rule in the keepList. For this reason,
and because spammers keep trying new scams, there are a
lot more rules in the supplied loseList than there are
in the keepList.
Safety First
You should add your own name and any unpublished email
addresses as 'To:' rules in your own SpamFryer.keepList
to reduce the risk of mails explicitly addressed to you
getting fried.
The default keepList contains certain user names which
must be acknowledged by mail to any domain - RFC 2142
(one of the internet standards, informally known as a
'Request for Comment') says that mails to postmaster,
abuse, security and noc user names (for a server) must
be handled by a human. If you don't own a domain, you
can delete these rules. If you do, it's worth adding
the rest of the address (e.g. abuse@vituperation.org)
to narrow down the default test.
A few more default rules let through mails associated
with yahoo group internet mailing lists, and those
associated with Aminet and the YAM Amiga mailer. Add
more rules to suit the lists you subscribe to, unless
you'd prefer to have SpamFryer check those for spam
references - some list servers filter spam well, but
some act annoyingly as spam relays.
If you are concerned about the small risk of losing
wanted mails due to the accidental use of terms common
in junk mail, you should check the contents of
SpamFryer.loseList and remove any rules that you
consider might delete things you want to know of.
All the rules in that file are there because they
have identified at least four (often many more)
bulk junk mails sent out in the first half of
2004. But a few people might want unsolicited
information about cable filters (even variously
mis-spelt) penis enlargement or extended warranties,
or might even send mails asking about such things -
if so they should delete the rules containing those
terms, or they may lose the replies.
To be on the safe side, rename SpamFryer.loseList
or move it to another directory until you've made
sure it doesn't exclude any patterns that might be
in mails you want to read. That way the only tests
SpamFryer will perform to identify mails to lose
are for all-HTML mail, those addressed to web (not
email!) addresses, those for undisclosed-recipients
or those marked as spam by SpamAssassin on a server.
You can remove those tests by deleting the lines
starting 'CALL lose_rule' in SpamFryer.rexx - but
if you want any of these you probably should not
be using Spam Fryer at all. 8-)
General rules about rules
Comparisons ignore case, so THIS matches thIs and This,
and any line with that word (even THIStle) will match.
If you want to match a specific word, rather than part
of one, put the pattern in 'single ' or " double"
quotes with a space either side (as in the examples)
- however if you have a space both sides you may not
pick up a reference at the start or end of a line.
Put // (remember the space) at the start of a line to
temporarily disable a rule without removing it from the
list. Blank lines are ignored, but can make sets clearer.
Before you
SpamFryer writes a report showing how many messages it
has killed from each category, and how many it has left
on the server. There will probably still be a few spams
there, but you'll have eliminated most of them by running
SpamFryer before you collect mail in the usual way. As
it's an ARexx script you can automate the process so the
script runs first, whenever your mail client goes to get
new mail - but I leave the details of this to you. :-)
Editing the source
This section is for programmers who want do more than just
add a rule which includes or excludes mails from SpamFryer's
list of things to fry. You will need to understand a bit about
ARexx programming, but not much. ARexx manuals come with Amiga
OS 3.1, A4000s and some earlier Amiga systems. Copious documents
about ARexx are on-line (http://amycoder.hypermart.net/arexx.lha
is a good start) though there's rather less information about
the ARexx interface to TCP/IP - I worked out how to write this
by examining ChkMail (on Aminet) which as written in 1994 by
Matt White <whitem (at) duke (dot) usask (dot) ca> and from basic
knowledge of the POP3 protocol, which I previously used from
an Amiga Shell via telnet to port 110 on my ISP's mail server
(thanks to Peter Corlett for first showing me how to do this).
POP3 is a simple plain-text protocol - you send commands like
"user <name>" and "pass <password>" and "stat" to log in and
get a list of messages, then "top <message number> <lines>"
to read back a given number of lines from the chosen message,
and "dele <message number>" to delete it. The protocol is
documented here: http://www.faqs.org/rfcs/rfc1939.html
The script can writes messages about the header of each mail
and the reason it is considered spam. If you want to make it
check but not delete anything you can comment out all the lines:
writeln(net,'DELE '||message)
by changing them to
/* writeln(net,'DELE '||message) */
The comment brackets in ARexx are /* */ just as in C.
You can then run the modified script and will see a list
of the things that would have been deleted, but they'll
all still be on the server after the test.
SpamFryer uses whatever rules it is programmed to apply by
the configuration files. Be wary of checks that might find
patterns in legitimate mails - the test for CIALIS looks
for a space after that name so it doesn't mistakenly fry
mails with the word 'specialist' in them, for example.
To be specific, if the mails you don't want all expect
you to reply to an address medical@hype.net, you can sift
them out like this:
if left(instring,10)='Reply-to: ' then
do
if pos('medical@hype.net',instring) >0 then spam=1
end
left(var,num) returns the first (leftmost) num characters of
variable var, so in this case it checks if the line in the
variable instring starts with the 10 characters 'Reply-to: '
and only performs the code between 'do' and 'end' if they
match. If you didn't care about the case of the characters
in this address you'd be far better off adding a REPLY-TO:
rule to SpamFryer.LoseList, but this example shows how to
add a test that requires an ExAcT match.
The prewritten tests use the ARexx POS function rather
than exact matches, so a check for .HTM would match
.HTML - and POS("HTM"),inCaps) would match HTM, _Html,
.html, hTm and so on - including Weightman which you
might not want...
Combination tests
Ad hoc code can be used to add more complex tests than the
keep and lose lists will allow. For instance, messages with
the text "created by women" in the first few lines are
suspect, because a substantial proportion of junk mails
that slipped through the net early in 2004 were from
dating sites which use this phrase as a come-on. Since all
the mails that triggered this also contained the word ' dating '
(with the spaces, so post-dating and carbon-dating would not
match) I set the variable 'dating' to zero before starting to
scan each mail header, and test as follows:
if pos(' DATING ',inCaps) >0 then dating = dating + 1;
if pos('CREATED BY WOMEN',inCaps) >0 then dating = dating + 1;
Then after scanning each mail, I check for at least two such
references, and only zap the mail if the above test triggered
more than once, as follows:
if dating>1 then spam=1
You can add more variables for other cases, adjusting the threshold
and the number added for each match, to create conditional rules
that are triggered by a combination of indicators, rather than
just one - although in many cases one indicator is sure enough.
-------------------------------------------------------------
Problems and solutions
Check these things first before you email the author for help:
(0) Remember to put your correct details into the
configuration block at the start of the script.
See 'Configuration' above to find out how to do
this. If you get it wrong you'll get a message
like this:
Error from server: -ERR authorization failed
Command returned 10
or maybe
+++ Error 18 in line 197: Invalid argument to function
Command returned 10/18: Invalid argument
That message suggests that your setting of Account.1.1
in SpamFryer.rexx, or HOSTNAME: in SpamFryer.accounts,
is incorrect, as the first line that attempts to talk to
the mail server is failing. You may be using the name of
your ISP (e.g. demon.co.uk) rather than their POP3 mail
server (e.g. mail.demon.net, or pop3.demon.co.uk.
The line number may vary if the script has been edited,
so check point (2) in this list too if you get Error 18.
(1) Make sure you're running ARexx. The shell command
'rexxmast' should ensure this. If it gives an error
message, fix that or /no/ ARexx scripts can work
on your system.
(2) Make sure you're online - if you get:
+++ Error 18 in line 180: Invalid argument to function
Command returned 10/18: Invalid argument to function
or maybe
Login [userName]: -ERR not found.
you're not connected to the Internet, or maybe not even
running a TCP/IP stack! SpamFryer can't work under such
conditions. Check you can connect to your mail server in
the usual way, then try to run SpamFryer again while you
are still online.
The line number may vary if the script has been edited,
so check point (0) in this list too if you get Error 18.
(3) Configuration error messages
SpamFryer attempts to catch all circumstances when errors
in the configuration stop it working properly. Assuming you
have the basics needed to run the script (see above) you
may still get messages if there are errors in the text files
that customise SpamFryer for your system. By default these
files are named SpamFryer.accounts, SpamFryer.keepList and
SpamFryer.loseList.
This section lists the error messages and explains their
meanings. Items in brackets vary depending on the
error and other aspects of your configuration
ERROR: Unrecognised item [word] in [accountFile]
The first word of a line in the SpamFryer.accounts file
must be // (for a comment, ignored by the program) or
'HOSTNAME:', 'USERNAME:' or 'PASSWORD:' followed by the
appropriate information for your mail server. If you
get this message it indicates that the file [accountFile]
(in the same directory as SpamFryer.rexx unless another
path is specified) contains a line which starts with
[word] rather than any of the expected terms.
ERROR: No user name configured for host' [hostName] in [AccountFile]
The file [accountFile] specifies a host [hostName] with
no associated user name for logging in to that host. To
fix this, add a USERNAME: line with the required name.
ERROR: No user name configured for host' [userName] in [AccountFile]
The file [accountFile] specifies an account [userName] but
contains no line indicating the server for that account. To
fix this, add a HOSTNAME: line with the required address.
ERROR: Duplicate passwords [word1] and [word2] in [AccountFile]
Two passwords were specified in the file without an intervening
host and user name. SpamFryer will attempt to use the second one.
To fix this, remove the redundant line starting with PASSWORD:
ERROR: Password [word] in [AccountFile] needs a host and user name
You have specified a password but no corresponding host or
user name. To fix this, add a USERNAME: line to indicate the relevant
account name and a HOSTNAME: followed by the matching server address.
ERROR: Rule [line] in SpamFryer.rexx skipped.
The indicated line in the SpamFryer.rexx script (or whatever you
may have renamed it to) is not understood. Search for the line
indicated in the message and make sure that it starts with one of
the correct terms ('TO:', 'FROM:', 'REPLY-TO:', 'SUBJECT:' or
'EARLY-REF:') to identify a section of the mail to be checked,
followed by a space and some pattern for SpamFryer to look for
in that context, on the same line.
ERROR in [SpamFryer config file] line [number] skipped.
The number tells you which line of the indicated file, counting
from 1, cannot be understood by SpamFryer. Search for the line
indicated in the message and make sure that it starts with one of
the correct terms ('TO:', 'FROM:', 'REPLY-TO:', 'SUBJECT:' or
'EARLY-REF:') to identify a section of the mail to be checked,
followed by a space and some pattern for SpamFryer to look for
in that context, on the same line.
(4) UAE and Amiga Forever
I use real Amigas, unless I'm writing for people without access
to the genuine article. But the monolithic and unsafe internet
software on most computers has led some people to run AmigaOS
via the excellent UAE emulator. SpamFryer works with UAE, but
requires some extra software to make the host's TCP/IP stack
accessible to scripts.
Joe Cosby posted the following question on an Amiga message board:
: SpamFryer tries to read from a device TCP:, which I guess must
: be created by the most common Amiga TCP/IP programs.
: This doesn't work under UAE though, there is no TCP: device. I am
: not really sure how UAE handles TCP/IP at all, actually [but] it is
: working for me, I browse the web and download email using AWeb and YAM.
: Does anybody know what, if anything, the equivalent in UAE is, or if
: there is a workaround for this?
Thomas Rapp helpfully replied:
You need the TCP-Handler program and the TCP mountlist. Get either AmiTCP
or Genesis from Aminet, they should both contain the needed files. Don't
install the archives, only copy the needed files to your System partition.
The UAE-Support directory contains files which should be
added to the corresponding directories on the SYS: drive
of a UAE setup, to enable the TCP: device which is used by
SpamFryer and many other fine AmigaOS networking programs.
Both files come from the freely-distributable AmiTCP stack,
release 3.0.2b. Please direct all questions about using
UAE to emulator support sites, rather than to the authors
of SpamFryer. If all else fails, get a real Amiga. ;-)
-------------------------------------------------------------
Credits
Thanks to the following people for help and feedback
since the first release of SpamFryer. Without them,
there would be no updates on Aminet:
Julian Aronowitz Paul Juhusz
Olaf Barthel Markus Lunk
Fabrizio Bartoloni Mike McCool
Adolf Brunner Vince Morra
Scott Campbell Harry Patterson
Peter Corlett Thomas Rapp
Joe Cosby Allan Rasmussen
Herve Dupont Brian Savage
Philippe Ferrucci Krister Skrtic
John Giudice John Smith
Simon Goodwin Stellan
Kelvin Graham Ivan Teskera
Keith Himmelreich Chris Young
-------------------------------------------------------------
History
Modified November 2003 to remove personal information
First Aminet upload
Modified December 2003 to explicitly QUIT and CLOSE (thanks to Chris Young)
Second Aminet upload
Modified January 2004 Verbose argument and multi-account system (by Elwood)
Bug fix: multiply-identified spams only get fried once
Reports errors and actions to log as well as console
Configurable truncation of long console subject lines
New check for 'Test, Yep.' Bagle/Beagle worm signature
also purges mails 'To: undisclosed-recipients' (SNG)
Combines reports for all accounts (Elwood's correction)
Junks all mails with the word VIAGRA inside (Stellan)
Junks all mails from excite.com (add more?) (Stellan)
Skips quickly through headers once spam is identified
Explicitly opens the console window - thanks Kelvin!
Closes log only after last account (fixes Elwood's fix)
POP3 commands end with explicit CR as well as LF (RFC)
Junks references to V1agra, Xanax and 'Cialis ' drugs
Combination tests sift out unwanted date invitations
Third Aminet Upload
Modified February 2004 Major updates, most of them made by Allan Rasmussen.
Added possibility to use a 'keep' and a 'lose' list.
Fixed a minor bug which prevented the Reply-To: field
from being scanned properly. I couldn't figure out what
the variable 'both' was all about, so I got rid of it
and invented a simpler way to produce the final output.
Removed the 'bogus address' option, as it is redundant.
Made it possible to keep a growing logfile. Made the
script compatible with public ARexx ports. Fixed a bug
which prevented the second account from being scanned
if the first was empty.
Modified March/April Initial keep/lose list update made by Allan Rasmussen.
2004 Now verbose also works on the log file. Made an offline
version of the script for YAM. Verbose argument changed
to quiet in the offline YAM version. Simon: Junks mails
with the word 'searchingforasoulmate' inside. Allan:
Added Early-Ref: argument to the lists. Renamed lists.
Simon: removed checks for old worm subjects, added John
Smith's patch for optional interactive password entry,
added headings for Elwood's multiple account reporting.
Symbolic names for constant list indices for readability.
Case-independent list pattern handling. No categorisation.
Modified May 2004 Call to learn rules. Allow keep and lose list information
to be embedded in this program file. Allow comments in list
files - such lines must start with "// " (including the
space, which the ARexx parser treats as a delimiter).
Many new rules.
Modified June 2004 New code to check and report rule effectiveness.
Code cleanup, consistent nesting and capitalisation.
Allows account details to be read from a file.
Modified July 2004 Option to kill all mail to addresses with digits in.
Now reads other accounts even if first has no mail.
Parsing of account file is more robust and error-trapped.
Colons after first field in lists are now optional.
Quoted pattern support allows leading or trailing spaces.
Fourth Aminet Upload, July 2004
Modified August 2004 Always reports if a list file is not found if that list's
name in the script is not null. Rejects mails with both
no subject and no 'from' or 'reply-to' address (Elwood).
New rule: rejects mails with 'prescription' in subject.
French translation of ARexx added to package (Herve).
Clarified integration in SpamFryer.yam.readme (Allan).
Missing History file added to the archive.
Clarified distribution and translation rules (Simon).
Fifth Aminet Upload, August 2004
To do (depending on feedback and help from users)
Implement merged YAM filter and stand-alone script functions
Update rules to catch new sorts of spam and to reflect RFCs
-------------------------------------------------------------
Distribution
SpamFryer is copyright Simon N Goodwin and individual
contributors. It may be freely distributed, without change,
as long as all of the original files in the current Aminet
release are included in the distribution.
Nobody is allowed to distribute cut-down, edited, extended
or otherwise modified packages based on SpamFryer, without
the explicit permission of Simon Goodwin.
Suggestions for changes and extensions are very welcome. In
general these will be incorporated into the full release
on Aminet.
This rule has been made explicit because otherwise there is
a big risk that changes might be made or rules could be added
which substantially increase the chance that mails users want
to keep are inadvertently deleted. Whilst this risk cannot be
avoided in any automatic program, a great deal of effort has
gone into developing, testing and documenting SpamFryer with
a view to minimising such risk.
Translations
I welcome translations of the script and ideally all the
documentation into any language, to make SpamFryer more
useful to those who are not accustomed to English. But I
am concerned that such changes, unless carefully done and
tested, might make the script less safe for users. I am
also concerned at the extra work involved in keeping many
versions of the script up to date.
A translation may not be accepted unless the author is
prepared to maintain it for future releases of SpamFryer.
The preferred format for the translation is in the form
of a list of unique English and translated patterns which
can be automatically searched for and replaced, using free
Amiga software, so that fresh translated versions of the
script can be produced from the original English version
with minimal need for manual intervention. Translators
should be prepared to help in the updating of SpamFryer
so that their work is not made obsolete by developments.
-------------------------------------------------------------
Contact
I hope you like this package, and welcome emails about
it as long as they are constructive and in English, and
not entirely in HTML (or they will be fried as spam ;-).
I apologise to those who have been waiting for a long
time for this update, and hope the substantial increase
in features and flexibility explains the delay. The code
of SpamFryer is a lot more complicated than the initial
release, but also more general. I hope that the code is
now feature complete so that (bar bug fixes) any future
release can focus on changes to the keepList and loseList
text files to catch more spams yet avoid losing mails we
would like to keep.
My email address is amiga <at> studio <dot> co <dot> uk
Simon N. Goodwin, Warwick UK, August 2004
Former Commodore Amiga hardware developer #2202
Former Commodore Amiga Certified Software developer
Former Motorola 68060 processor Alpha/Beta tester
Former columnist, Amiga Format, Amiga User International
Former Amiga Inc Audio development team leader
Continuing Amiga A4000/060 user and developer :-)